/*import animal.Cat;
import animal.Dog;
import animal.Duck;
import animal.Irun;

import java.util.Objects;

class Person{
    public String name;
    public int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return age == person.age && Objects.equals(name, person.name);
    }

*//*    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }*//*
}

public class Test {

    public static void walk(Irun irun){
        irun.run();
    }

    public static void main(String[] args) {
*//*
        Person person1 = new Person("张三",10);
        Person person2 = new Person("张三",10);

        System.out.println(person1.hashCode());
        System.out.println(person2.hashCode());
*//*
        //Dog dog = new Dog();

        walk(new Dog("旺财",11));
        walk(new Cat("小咪",10));
   *//*     walk(new Duck());*//*

        //System.out.println(person1.equals(person2));
        *//*Person person = new Person();
        System.out.println(person);*//*

        *//*int[] arr = new int[2];
        System.out.println(arr[0]);*//*
    }
}*/

/*
class A{
    public int age;
    public static int price;

    public A(){
        System.out.println("A()......");
    }

    public void methodA1(){
        System.out.println("methodA1()......");
    }

    public static void methodA2(){
        System.out.println("methodA2()......");
    }

    public void methodA3(){
        System.out.println("methodA3()......");
    }

*/
/*    static class B{

        public void methodB(){
            //age = 10;//err,静态内部类只能访问外部类的静态成员
            //A();//不要再静态内部类中调用外部类的构造方法
            //methodA1(); //err,静态内部类只能访问外部类的静态成员,methodA1不是类方法（静态成员方法）
            price = 10;
            methodA2();
        }

    }*//*


    class C{

        public int age = 10;

        public void methodC(){
            System.out.println(age);
            methodA3();
            System.out.println(A.this.age);
            methodA1();
            A.this.methodA1();
        }

        public void methodA1(){
            System.out.println("C::methodA1()......");
        }
    }

    //.....
}


public class Test{
    public static void main(String[] args) {
        //A.B b = new A.B();
        //A.C c = new A().new C();
        //c.methodC();
        //A a = new A();
        A.C c = new A().new C();
        //A.C c2 = A.new C();
        //A.C c = A.new C();
        //A.C c = A.new A.C();
    }

    public void A(){
        //...

        class D{
            //......
        }

        //...
    }
}*/

/*class A{
    public void test1(){
        System.out.println("heihei");
    }
}*/

interface A{
    void test1();
}

public class Test{

    public static void main(String[] args) {
        A a = new A(){
            public void test1(){
                System.out.println("haha");
            }
        };

        a.test1();
    }

}